/* 通用样式 */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f7fafc;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* 登录页面样式 */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f7fafc;
}

.login-container {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container h1 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
}

.login-container input {
    width: 100%;
    padding: 12px;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.login-container input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 5px rgba(66, 153, 225, 0.5);
}

.login-container button {
    width: 100%;
    padding: 12px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-container button:hover {
    background-color: #3182ce;
}

.message {
    margin-top: 1rem;
    color: #e53e3e;
    font-size: 14px;
}

/* 导航栏样式 */
nav {
    background-color: #4299e1;
    color: white;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav h1 {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 主内容区域样式 */
#randomQuestionSection {
    margin-top: 2rem;
}

#randomQuestion {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#randomQuestion p {
    font-size: 18px;
    color: #333;
    margin-bottom: 1rem;
}

#randomQuestion input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#randomQuestion input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 5px rgba(66, 153, 225, 0.5);
}

#randomQuestion button {
    width: 100%;
    padding: 12px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#randomQuestion button:hover {
    background-color: #3182ce;
}

#resultMessage {
    margin-top: 1rem;
    font-size: 16px;
    color: #333;
}

/* 高频错题列表样式 */
#wrongQuestionsList {
    margin-top: 2rem;
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#wrongQuestionsList h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

#wrongQuestionsList ul {
    list-style: none;
    padding: 0;
}

#wrongQuestionsList li {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 16px;
    color: #333;
    transition: background-color 0.3s ease;
}

#wrongQuestionsList li:last-child {
    border-bottom: none;
}

#wrongQuestionsList li:hover {
    background-color: #f7fafc;
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    width: 500px;
    max-width: 90%;
    position: relative;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 32px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

/* 弹窗表单样式 */
#addQuestionForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#addQuestionForm input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#addQuestionForm input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 5px rgba(66, 153, 225, 0.5);
}

#addQuestionForm button {
    width: 100%;
    padding: 12px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#addQuestionForm button:hover {
    background-color: #3182ce;
}

/* 提交答案弹窗样式 */
#submitAnswerForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#submitAnswerForm input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s ease;
}

#submitAnswerForm input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 5px rgba(66, 153, 225, 0.5);
}

#submitAnswerForm button {
    width: 100%;
    padding: 12px;
    background-color: #4299e1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#submitAnswerForm button:hover {
    background-color: #3182ce;
}

/* 题目列表样式 */
#questionListSection {
    margin-top: 2rem;
}

#questionList {
    list-style: none;
    padding: 0;
}

#questionList li {
    padding: 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 16px;
    color: #333;
    transition: background-color 0.3s ease;
}

#questionList li:last-child {
    border-bottom: none;
}

#questionList li:hover {
    background-color: #f7fafc;
}

#questionList p {
    margin: 0;
}